import { createApp } from 'vue'

//引入elementplus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import App from './App.vue'
import router from './router'
//引入pinia
import {createPinia} from 'pinia'
//引入新的pinia插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

//粒子库
import Particles from "@tsparticles/vue3";
import { loadSlim } from "@tsparticles/slim"; // if you are going to use `loadSlim`, install the "@tsparticles/slim" package too.


const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)


//虽然只导入了router但是由于是router会默认
//寻找index所以不用专门写子文件index
createApp(App)
//.mouse必须在所有的.use之后，望周知
.use(router)
.use(pinia)
.use(ElementPlus)
.use(Particles, {
    init: async engine => {
      // await loadFull(engine); // you can load the full tsParticles library from "tsparticles" if you need it
      await loadSlim(engine); // or you can load the slim version from "@tsparticles/slim" if don't need Shapes or Animations
    },
  })
.mount('#app')


